<style>
    .form-group .required:before{
        content:'* ';
        color:red;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="alert alert-danger-light">
        货品入库和订单定金、尾款，系统自动创建的账单，不允许随意修改金额
    </div>

    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2 required">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required"   class="form-control" name="row[type]" type="hidden" value="{$type}" placeholder="">
            <input  data-rule="required"   class="form-control"  readonly type="text" value="{$type_name}" placeholder="">

        </div>
    </div>


    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2 required">账单类别:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[cate_bianhao]', $cateData, $cate_bianhao,['class'=>'form-control', 'data-rule'=>'required'])}

        </div>
    </div>




    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2 required">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="" class="form-control" name="row[title]" type="text" value="{$data.title ?? ''}" placeholder="">

        </div>
    </div>
    {if $id != 0 and ($data['inventory_bianhao'] != '' or $data['order_bianhao'] != ''  ) }
    <div class="form-group">
        <label for="c-money" class="control-label col-xs-12 col-sm-2 required">{:__('jine')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" data-rule="" class="form-control" name="" type="number" value="{$data.price ?? ''}" placeholder="" disabled>

        </div>
    </div>
    {else/}
    <div class="form-group">
        <label for="c-money" class="control-label col-xs-12 col-sm-2 required">{:__('jine')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" data-rule="required" class="form-control" name="row[price]" type="number" value="{$data.price ?? ''}" placeholder="">

        </div>
    </div>
    {/if}
    <div class="form-group">
        <label for="c-remark" class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" data-rule="" class="form-control" name="row[remark]" type="text" value="{$data.remark ?? ''}" placeholder="">

        </div>
    </div>







    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[id]" value="{$id}">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
